package com.asset.dispoal.plaintiffConfiguration.service;

import com.asset.dispoal.plaintiffConfiguration.api.ISysPlaintiffConfigurationService;
import com.asset.dispoal.plaintiffConfiguration.dto.SysPlaintiffConfigurationRequest;
import com.asset.dispoal.plaintiffConfiguration.dto.SysPlaintiffConfigurationResponse;
import com.asset.dispoal.plaintiffConfiguration.service.commom.PlaintiffConfigurationDelCommand;
import com.asset.dispoal.plaintiffConfiguration.service.commom.PlaintiffConfigurationInsertCommand;
import com.asset.dispoal.plaintiffConfiguration.service.commom.PlaintiffConfigurationQueryPageCommand;
import com.asset.dispoal.plaintiffConfiguration.service.commom.PlaintiffConfigurationUpdateCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.mhuang.pacebox.springboot.protocol.Result;
import tech.mhuang.pacebox.springboot.protocol.data.PageVO;

/**
 * 案件原告配置表服务实现类
 *
 * @author: mhuang
 * @date: 2022-03-21 15:43:49
 */
@Service
public class SysPlaintiffConfigurationServiceImpl implements ISysPlaintiffConfigurationService {

    @Autowired
    PlaintiffConfigurationInsertCommand plaintiffConfigurationInsertCommand;

    @Autowired
    PlaintiffConfigurationUpdateCommand plaintiffConfigurationUpdateCommand;

    @Autowired
    PlaintiffConfigurationDelCommand plaintiffConfigurationDelCommand;

    @Autowired
    PlaintiffConfigurationQueryPageCommand plaintiffConfigurationQueryPageCommand;

    @Override
    public Result insert(SysPlaintiffConfigurationRequest request) {
        return plaintiffConfigurationInsertCommand.execute(request);

    }

    @Override
    public Result update(SysPlaintiffConfigurationRequest request) {
        return plaintiffConfigurationUpdateCommand.execute(request);
    }

    @Override
    public Result delete(String id) {
        return plaintiffConfigurationDelCommand.execute(id);
    }

    @Override
    public Result<PageVO<SysPlaintiffConfigurationResponse>> queryPage(SysPlaintiffConfigurationRequest request) {
        return plaintiffConfigurationQueryPageCommand.execute(request);
    }
}